import {
  Column,
  CreateDateColumn,
  DeleteDateColumn,
  PrimaryGeneratedColumn,
  UpdateDateColumn,
} from 'typeorm';

/**
 * 时间参数都是可以被选择的
 */
export abstract class CommonSelectEntity {
  @PrimaryGeneratedColumn()
  id: number;

  @Column({ default: 1, comment: '状态' })
  status: number;

  @Column({ nullable: true, comment: '描述' })
  remark: string;

  @CreateDateColumn({ comment: '创建时间' })
  createDate?: Date;

  @UpdateDateColumn({ comment: '更新时间' })
  updateDate?: Date;

  @DeleteDateColumn({ comment: '删除时间' })
  deleteDate?: Date;
}
